package com.maiji.cloud.entities.shopingmall;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Date;

@NoArgsConstructor
@Data
@Accessors(chain=true)
@Table(name = "shoping_address")
public class ShopingAddress {

    @TableId
    @Column(name = "uu_id", type = MySqlTypeConstant.VARCHAR, length = 50, isKey = true)
    private String uuId;

    @Column(name = "user_id", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String userId;

    @Column(name = "consignee", type = MySqlTypeConstant.VARCHAR, length = 20)
    private String consignee; // 收货人

    @Column(name = "tel", type = MySqlTypeConstant.VARCHAR, length = 20)
    private String tel; // 收货电话

    @Column(name = "area_info_id", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String areaInfoId; // 收货地址ID

    @Column(name = "address_label", type = MySqlTypeConstant.INT, length = 1)
    private Integer addressLabel; // 地址标签：1-家，2-公司，3-学校

    @Column(name = "is_default", type = MySqlTypeConstant.INT, length = 1)
    private Integer isDefault; // 是否设为默认收货地址：0-否，1-是

    @Column(name = "add_date", type = MySqlTypeConstant.DATETIME)
    private Date addDate; // 添加/编辑时间

    @Column(name = "auto", type = MySqlTypeConstant.BIT)
    private Boolean auto; // 是否绑定订单

    @TableLogic
    @Column(name = "is_del", type = MySqlTypeConstant.INT, length = 1, defaultValue = "0")
    private Integer isDel; // 是否删除：0-否，1-是

}
